package com.qihetimes.earthangel.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 会话消息表
 * </p>
 *
 * @author f4cklangzi@gmail.com
 * @since 2021-12-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("conversation_message")
@ApiModel(value="ConversationMessage对象", description="会话消息表")
public class ConversationMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId("id")
    private String id;

    @ApiModelProperty(value = "会话表关联ID")
    @TableField("conversation_relation_id")
    private String conversationRelationId;

    @ApiModelProperty(value = "消息发送人ID")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "消息内容(文本消息为消息内容，图片消息为图片URL)")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "消息类型(TEXE/IMAGE)")
    @TableField("message_type")
    private String messageType;

    @ApiModelProperty(value = "发送时间")
    @TableField("created_at")
    private LocalDateTime createdAt;


}
